package com.iot.ht.job;

import com.iot.core.manager.job.IMyDbJob;
import com.iot.core.springboot.ApplicationUtils;
import com.iot.core.util.MyDateTime;
import lombok.extern.slf4j.Slf4j;
import org.quartz.DisallowConcurrentExecution;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.util.ObjectUtils;

@Slf4j
@DisallowConcurrentExecution
public class DBPrintJob implements IMyDbJob {
    @Override
    public String getJobName() {
        return "PrintJob";
    }

    @Override
    public String getJobGroup() {
        return "Group1";
    }

    @Override
    public String getJobDesc() {
        return "测试";
    }

    @Override
    public String getCron() {
        return "*/30 * * * * ?";//5秒
    }

    @Override
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        try{

            log.info( this.getJobName()+":"+ MyDateTime.now() );
        }
        catch (Exception ex){

        }
        finally {

        }
    }
}
